package cron

import (
	"log"
	"time"

	"github.com/robfig/cron"
)

func Task(sep string, f func()) {
	log.Println("Starting...")

	c := cron.New()
	c.AddFunc(sep, f)

	c.Start()

	t1 := time.NewTimer(time.Second * 100)
	for {
		select {
		case <-t1.C:
			t1.Reset(time.Second * 100)
		}
	}
}
